<!DOCTYPE HTML>
<html lang="utf-8">
<head>
<meta charset="utf-8">
<title>驾车宝典-帖子列表</title>
<link href="${ctx}/styles/group.css" rel="stylesheet" type="text/css">
<#include '/baseHead.ftl'>
<!--导航结束-->
<!--/{cityNo}-{cateId}-{filter}-{titleTypeId}-{pageNumber}-{orderBy} -->
<#macro pageLink  type,pageNumber>${ctx}/behavior/${type}/${pageNumber}</#macro>
<script>
	function changeOrder(select){
		window.location.href = "${ctx}/forum/list/${cityNo}-${cateId}-${filter}-${titleTypeId}-1-"+select.value;
	}
</script>

<!--主要部分开始-->
<section id="main"><div class="bgA_01">
	
	<!--左边开始-->
	<div id="leftArea">
		
		<div class="freshNewsPanel_01">
			<nav class="menuField">
				<ul>
					<li><a <#if type=='all'> class="on" </#if> href="${ctx}/behavior/all/1" title="所有人的动态">所有人的动态</a></li>
					<#if isLogin>
					<li><a <#if type=='friend'> class="on" </#if> href="${ctx}/behavior/friend/1" title="来自朋友的动态">朋友的动态</a></li>
					</#if>
				</ul>
			</nav>
			<div class="listField">
				<ul>
					<#list page.result as behavior>
					<li>
						<div class="imgContent">
							<a href="<@userCenterLink memberId="${behavior.memberId?c}"/>" title="查看个人资料">
								<img src="${behavior.headImage!}" width="60" height="60" alt="${behavior.nickName!}">
							</a>
						</div>
						<div class="infoContent">
							<h2><a href="<@userCenterLink memberId="${behavior.memberId?c}" />" title="查看个人资料" class="name">${behavior.nickName!}</a>&nbsp;${behavior.cont!}</h2>
						</div>
						<div class="textContent">
							<div class="img">
								<a href="${behavior.url!}" title="查看详情"><img src="${behavior.image!}" width="80" height="80" alt=""></a>
							</div>
							<div class="title">
								<h2><a href="${behavior.url!}" title="查看详情">${behavior.title!}</a></h2>
							</div>
							<div class="text">
								<p><#if  (behavior.contPreview?exists && behavior.contPreview?length>100 )>
									${behavior.contPreview?substring(0,100)}
									<#else>
									${behavior.contPreview!}
									
									</#if>	
								</p>
							</div>
							<div class="info">
								<!--<p class="count">845点击</p> -->
								<p class="name">发布者：<a href="<@userCenterLink memberId="${behavior.createMemberId?c}" />" title="查看个人资料">${behavior.createMemberName!}</a> 来自小组：<a href="<@groupDetailLink groupId="${behavior.fkGroupId!}" />" title="查看小组资料">${behavior.groupName!}</a></p>
							</div>
						</div>
					</li>
					</#list>
				</ul>
			</div>
			<div class="pageNumField">
			</p>
			<p>
				<#if !page.firstPage>
					<a href="<@pageLink  type="${type}"  pageNumber="1"  />">首页</a>
					</#if>
					<#if page.hasPreviousPage>
					<a href="<@pageLink  type="${type}"  pageNumber="${pageNumber-1}"  /> ">上一页</a>
					</#if>
					<#list page.getLinkPageNumbers() as item>
						<#if item_index==5> 
						</#if>
						<#if item == page.thisPageNumber>
						<!--/{cityNo}-{cateId}-{filter}-{groupId}-{pageNumber}-{orderBy} -->
							<a href="javascript:;" class="on">${item?c}</a>
						<#else>
								<a href="<@pageLink  type="${type}"  pageNumber="${item?c}"  />">${item?c}</a>
						</#if>
					</#list>
						<#if page.hasNextPage>
					<a href="<@pageLink  type="${type}"  pageNumber="${pageNumber+1}"  /> ">下一页</a>
					</#if>
					<#if !page.lastPage>
					<a  href="<@pageLink  type="${type}"  pageNumber="${page.lastPageNumber?c}"  /> ">末页</a>
					</#if>
			</p>
			</div>
			
		</div>
	
	</div>
	<!--左边结束-->
	
	<!--右边开始-->
	<div id="rightArea">
		
	<#if isLogin>
			<#include  '/common/memberInfo.ftl' >
			<#else>
			<div class="userPanel_01">
				<div class="formField">
					<dl>
						<dt>帐号</dt>
						<dd><input type="text" id="loginName" class="txt"   placeholder="请输入邮箱或者手机号">
						<!-- <a class="link" href="#" title="忘记密码？">忘记密码</a>-->
						 </dd>
					</dl>
					<dl>
						<dt>密码</dt>
						<dd>
							<input type="password" id="password" class="txt"   placeholder="请输入密码">
						 	<button class="btn btn1" title="点击登录" onclick='loginInIndex();'>登 录</button>
						 </dd>
					</dl>
				</div>
				<div class="linkField">
						<!-- 使用第三方帐号登录 
				<a href="#" class="link link1" title="微博帐号登录"></a> 
					 <a href="#" class="link link2" title="腾讯微博帐号登录"></a>
					 <a href="#" class="link link3" title="人人网帐号登录"></a>-->
				</div>
			</div>
			</#if>
			
		<#if isLogin>
		<div class="btnPanel_01">
			<!-- <a href="#" class="btn btn1" title="我的动态">我的动态</a> -->
		</div>
		</#if>
		
		<div class="activePeoplePanel_01">
			<div class="titleField titleType_01">
				<p class="more"><a href="<@userCenterLink memberId="${starMember.memberId?c}"/>" title="更多">更多&gt;&gt;</a></p>
				<h1>活跃达人</h1>
			</div>
			<div class="infoField">
				<div class="img">
					<a href="<@userCenterLink memberId="${starMember.memberId?c}"/>" title="查看个人信息">
						<img src="${starMember.headImage!}" width="60" height="60" alt="${starMember.nickName!}">
					</a>
				</div>
				<div class="info">
				
					<p class="btns" id="member${starMember.memberId?c}">
					
						<#if isLogin && ( SESSION_MEMBER_KEY.memberId!=starMember.memberId)>
									<#if starMember.focusDate?exists>
											<a href="javascript:deleteFocus(${starMember.memberId?c})" class="btn btn1" title="取消关注">- 取消关注</a>
									<#else>
											<a href="javascript:focus(${starMember.memberId?c})" class="btn btn1" title="加关注">+ 关注</a>
									</#if>
								
							    </#if>
					
					</p>
					<h2><a class="name" href="<@userCenterLink memberId="${starMember.memberId?c}"/>" title="查看个人信息">${starMember.nickName!}</a></h2>
					<p>${starMember.signature!}</p>
				</div>
			</div>
			<div class="listField">
				<div class="title">
					<p class="more"><a href="<@userCenterLink memberId="${starMember.memberId?c}"/>" title="全部">全部&gt;&gt;</a></p>
					<h2>TA的分享<span>（${startMemberBehaviorPage.totalCount}条）</span></h2>
				</div>
				<div class="list">
					<ul>
						<#list  startMemberBehaviorPage.result as behavior>
						<li style='overflow:hidden'><a href="#">${behavior.cont!}</a></li>
						</#list>
					</ul>
				</div>
			</div>
		</div>
		
		<div class="interestedPanel_01">
			<div class="titleField titleType_01">
				<h1>您可能感兴趣的人</h1>
			</div>
			<div class="listField">
				<ul>
					<#list  memberList as member>
					<li>
							<div class="img">
							<a href="<@userCenterLink memberId="${member.memberId?c}"/>" title="查看个人信息">
								<img src="${member.headImage!}" width="60" height="60" alt="${member.nickName!}">
							</a>
						</div>
						<div class="info">
							<p class="btns" id="member${member.memberId?c}">
								<#if isLogin && ( SESSION_MEMBER_KEY.memberId!=member.memberId)>
											<#if member.focusDate?exists>
													<a href="javascript:deleteFocus(${member.memberId?c})" class="btn btn1" title="取消关注">- 取消关注</a>
											<#else>
													<a href="javascript:focus(${member.memberId?c})" class="btn btn1" title="加关注">+ 关注</a>
											</#if>
										
									    </#if>
							
							</p>
							<h2><a class="name" href="<@userCenterLink memberId="${member.memberId?c}"/>" title="查看个人信息">${member.nickName!}</a></h2>
							<p>${member.signature!}</p>
				</div>
					</li>
					</#list>
				</ul>
			</div>
		</div>
	<!--右边结束-->
	</div>
<#include '/commonFriendLink.ftl'>

</div></section>

<!--主要部分结束-->
<#include '/baseFoot.ftl'>
<script charset="gbk" src="${ctx}/scripts/kindeditor-min.js"></script>
<script>

function focus(memberId){
			$.ajax({
		 			type: "get",
					url: "${ctx}/smgmemberfocus/focus/"+memberId,
					beforeSend: function(XMLHttpRequest){
					//ShowLoading();
					},
					success: function(data, textStatus){
						var state = data.state;
						if ( state == 1 ){
							$('#member'+memberId).html("<a href='javascript:deleteFocus("+memberId+");' class='btn' style='color:red'>- 取消关注</a>");
						}else{
							desc = data.desc;
							alert(desc);
						}
					},
					data:{
					},
					dataType:'json'
				}
	 		)
	}
	function deleteFocus(memberId){
		$.ajax({
		 			type: "get",
					url: "${ctx}/smgmemberfocus/deleteFocus/"+memberId,
					beforeSend: function(XMLHttpRequest){
					//ShowLoading();
					},
					success: function(data, textStatus){
						var state = data.state;
						if ( state == 1 ){
							$('#member'+memberId).html("<a href='javascript:focus("+memberId+");' class='btn btn1' style='color:red'>+ 关注</a>");
						}else{
							desc = data.desc;
							alert(desc);
						}
					},
					data:{
					},
					dataType:'json'
				}
	 		)
	}
</script>

